#include <iostream>
#include <mockcpp/mockcpp.hpp>

static int foo() {
  return 1;
}

static int fooStub() {
  return 2;
}

void Mytest() {
  int dummy = 1; // just a place to set breakpoint
  MOCKER(foo).stubs().will(invoke(fooStub));
  int ret = foo();
  std::cout << ret << std::endl;

  GlobalMockObject::verify(); // this will clear all mock object
}

int main() {
  Mytest();
  auto ret = foo();
  std::cout << ret << std::endl;
}